<template>
	<view class="user pageBg">
		<custom-nav-bar :show-title="false" :show-search="false"></custom-nav-bar>
		<view class="user-info">
			<view class="avatar">
				<image src="/static/images/xxmLogo.png" mode="aspectFit"></image>
			</view>
			<view class="ip">123.123.123.123</view>
			<view class="ip-region">来自于：安徽</view>
		</view>
		<view class="section">
			<view class="list">
				<view class="row" @click="navigatorTo()">
					<view class="left">
						<uni-icons type="download-filled" size="22"></uni-icons>
						<view class="text">我的下载</view>
					</view>
					<view class="right">
						<view class="text">33</view>
						<uni-icons type="forward" size="16" color="#aaa"></uni-icons>
					</view>
				</view>
				<view class="row" @click="navigatorTo()">
					<view class="left">
						<uni-icons type="star-filled" size="22"></uni-icons>
						<view class="text">我的评分</view>
					</view>
					<view class="right">
						<view class="text">5</view>
						<uni-icons type="forward" size="16" color="#aaa"></uni-icons>
					</view>
				</view>
				<view class="row">
					<view class="left">
						<uni-icons type="chatboxes-filled" size="22"></uni-icons>
						<!-- #ifdef MP-WEIXIN -->
							<view class="text">联系客服</view>
						<!-- #endif -->
						<!-- #ifdef H5 -->
							<view class="text">拨打电话</view>
						<!-- #endif -->
					</view>
					<view class="right">
						<uni-icons type="forward" size="16" color="#aaa"></uni-icons>
					</view>
					<!-- #ifdef MP-WEIXIN -->
						<!-- 微信小程序联系客服点击按钮 -->
						<button class="kefu" open-type="contact"></button>
					<!-- #endif -->
					<!-- #ifdef H5 -->
						<!-- 微信小程序联系客服点击按钮 -->
						<button class="kefu" @click="callPhone()"></button>
					<!-- #endif -->
				</view>
			</view>
		</view>
		<view class="section">
			<view class="list">
				<view class="row">
					<view class="left">
						<uni-icons type="notification-filled" size="22"></uni-icons>
						<view class="text">订阅更新</view>
					</view>
					<view class="right">
						<uni-icons type="forward" size="16" color="#aaa"></uni-icons>
					</view>
				</view>
				<view class="row">
					<view class="left">
						<uni-icons type="flag-filled" size="22"></uni-icons>
						<view class="text">常见问题</view>
					</view>
					<view class="right">
						<uni-icons type="forward" size="16" color="#aaa"></uni-icons>
					</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script setup>
const callPhone = ()=> {
	uni.makePhoneCall({
		phoneNumber: "17333256325",
	});
};
const navigatorTo = ()=> {
	uni.navigateTo({
		url: "/pages/classify-list/classify-list"
	})
}
</script>

<style lang="scss" scoped>
	.user {
		.user-info {
			padding: 50rpx;
			display: flex;
			align-items: center;
			justify-content: center;
			flex-direction: column;

			.avatar {
				margin: 30rpx;

				image {
					width: 160rpx;
					height: 160rpx;
					overflow: hidden;
					border-radius: 50%;
				}
			}

			.ip {
				font-size: 40rpx;
				font-weight: 600;
			}

			.ip-region {
				color: #aaa;
			}
		}

		.section {
			width: 690rpx;
			margin: 50rpx auto;
			border: 1px solid #eee;
			border-radius: 10rpx;
			box-shadow: 0 0 30rpx rgba(0, 0, 0, 0.02);

			.row {
				background-color: #fff;
				position: relative;
				display: flex;
				justify-content: space-between;
				padding: 20rpx;
				border-bottom: 1px solid #eee;

				.left,
				.right {
					display: flex;
					align-items: center;
					justify-content: center;

					.text {
						margin-left: 20rpx;
						color: #666;
					}
				}
				.left {
					:deep(){
						.uni-icons {
							color: $brand-theme-color !important;
						}
					}
				}
				.right {
					.text {
						color: #aaa;
					}
				}

				&:last-child {
					border-bottom: none;
				}
				.kefu {
					position: absolute;
					top:0;
					left: 0;
					width: 100%;
					height: 100%;
					opacity: 0;
				}
			}
		}

		.section2 {}
	}
</style>